﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Web.Routing;

namespace WebApplicationDemo
{
    public class RouteConfig
    {
        public static void RegisterRoutes(RouteCollection routes)
        {
            routes.IgnoreRoute("{resource}.axd/{*pathInfo}");

            routes.MapRoute(
              name: "SelectRetrainEndpoint",
              url: "select_retrain",
              defaults: new { controller = "Home", action = "SelectRetrainEndpoint" }
            );

            routes.MapRoute(
              name: "UploadRetrainingData",
              url: "upload_data",
              defaults: new { controller = "Home", action = "UploadData" }
            );

            routes.MapRoute(
             name: "retrain",
             url: "retrain",
             defaults: new { controller = "Home", action = "Retrain" }
           );

            routes.MapRoute(
             name: "get_status",
             url: "get_status/{jobId}",
             defaults: new { controller = "Home", action = "QueryJobStatus" }
           );

             routes.MapRoute(
             name: "get_retrain_results",
             url: "get_retrain_results",
             defaults: new { controller = "Home", action = "GetRetrainResults" }
           );
             routes.MapRoute(
              name: "SelectScoringEndpoint",
              url: "select_scoring",
              defaults: new { controller = "Home", action = "SelectScoringEndpoint" }
            );

             routes.MapRoute(
               name: "SubmitUpdate",
               url: "submit_update",
               defaults: new { controller = "Home", action = "SubmitUpdate" }
             );
            routes.MapRoute(
                name: "Default",
                url: "{controller}/{action}/{id}",
                defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
            );
        }
    }
}
